package com.apes.scm.masterdata.enumeration.model;

import com.apes.framework.jpa.ApesBean;
import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.jpa.generator.ApesGenerator;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * 业务参数表
 * @author wuq
 * @create 2020-09-09 19:13
 */
@Getter
@Setter
@SelectBeforeUpdate
@DynamicUpdate
@DynamicInsert
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = BusinessParam.CONST_TABLE_NAME)
public class BusinessParam implements ApesBean {
    public static final String CONST_TABLE_NAME = "mas_Business_Param";

    @Id
    @Column(name = "id", length = 6)
    @ApesGenerator(code = CONST_TABLE_NAME, name = "业务参数表")
    @Comment("编号")
    private String id;

    @Column(name = "query_key", length = 32)
    @Comment("关键字（查询使用）")
    private String queryKey;

    @Column(name = "value", length = 32)
    @Comment("值")
    private String value;   //  使用String 为了通用

    @Column(name = "value2")
    @Comment("值")
    private String value2;

    @Column(name = "value3")
    @Comment("值")
    private String value3;

    @Column(name = "note", length = 250)
    @Comment("备注")
    private String note; //备注
}
